package com.zerui.manager.openplan.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * @Author wh
 * @create_time 2023-08-23 15:28
 */
@ApiModel("开门计划")
@Data
@ToString
@Accessors(chain = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "tb_open_plan",autoResultMap = true)
public class OpenPlanDo {

	@ApiModelProperty("主键，无业务含义")
	@TableId(value="id",type= IdType.ASSIGN_ID)
	@JsonFormat(shape = JsonFormat.Shape.STRING)
	private Long id;

	@ApiModelProperty("名称")
	private String name;

	@ApiModelProperty("计划是否生效")
	private Boolean accept;

	@ApiModelProperty("有效日期 - 开始")
	@JsonFormat(pattern = "yyyy/MM/dd")
	private LocalDate startDate;

	@ApiModelProperty("有效日期 - 结束")
	@JsonFormat(pattern = "yyyy/MM/dd")
	private LocalDate endDate;

	@ApiModelProperty("有效时间 - 开始")
	@JsonFormat(pattern = "HH:mm")
	private LocalTime startTime;

	@ApiModelProperty("有效时间 - 结束")
	@JsonFormat(pattern = "HH:mm")
	private LocalTime endTime;

	@ApiModelProperty("是否包含周末，1：是，0：否")
	private Boolean weekend;

	@ApiModelProperty("备注")
	private String remark;

	@ApiModelProperty("创建时间")
	@JsonFormat(shape = JsonFormat.Shape.STRING,pattern ="yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
	private LocalDateTime createTime;


}
